package com.wuhao.lib_base;

import android.app.Application;
import android.content.Context;

import com.wuhao.lib_base.utils.CPUHelper;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class BaseApplication extends Application {
    public static Context context;

    public static ExecutorService pool;
//    public static ExecutorService encodePool;
//    public static ExecutorService insertDbPool;
    @Override
    public void onCreate() {
        super.onCreate();
        context = BaseApplication.this.getApplicationContext();
        //创建线程池
        pool = Executors.newFixedThreadPool(CPUHelper.getNumCores() + 1);
//        encodePool = Executors.newFixedThreadPool(CPUHelper.getNumCores() + 1);
//        insertDbPool = Executors.newFixedThreadPool(CPUHelper.getNumCores() + 1);
    }
}
